<template>
  <div class="production-monitor">
    <!-- <div
      v-if="loading"
      v-loading="loading"
      class="loading"
      element-loading-text="加载中..."
      element-loading-spinner="el-icon-loading"
    ></div>
    <el-row v-show="!loading" class="row">
      <card>
        <el-row class="card-flex" :gutter="10">
          <el-col :lg="12" :xs="24" :sm="24">
            <el-image class="production-image" :src="productionImg" />
          </el-col>
          <el-col :lg="12" :xs="24" :sm="24" class="camera-box">
            <el-row class="camera-row" :gutter="10">
              <el-col
                v-for="item in 3"
                class="camera-col"
                :key="item"
                :xs="24"
                :sm="8"
                :lg="8"
              >
                <div class="camera-img-box">
                  <el-image class="camera-img" :src="cameraImg" fit="fill" />
                  <span class="camera-name">摄像机{{ item }}</span>
                </div>
              </el-col>
            </el-row>
            <el-row class="camera-row" :gutter="10" :xs="24" :sm="8">
              <el-col
                v-for="item in 3"
                class="camera-col"
                :key="item"
                :xs="24"
                :sm="8"
                :lg="8"
              >
                <div class="camera-img-box">
                  <el-image class="camera-img" :src="cameraImg" fit="fill" />
                  <span class="camera-name">摄像机{{ 3 + item }}</span>
                </div>
              </el-col>
            </el-row>
          </el-col>
        </el-row>
      </card>
    </el-row> -->
  </div>
</template>
<script>
import productionImg from "@/assets/images/production.png";
import cameraImg from "@/assets/images/camera.png";
export default {
  name: "productionMonitor",
  data() {
    return {
      productionImg,
      cameraImg,
      loading: true,
    };
  },
  created() {
    setTimeout(() => {
      this.loading = false;
    }, 1000);
  },
};
</script>
<style lang="scss" scoped>
.production-monitor {
  ::v-deep .card-body {
    padding-top: 0;
  }
  .loading {
    min-height: 100px;
    margin-bottom: 10px;
  }
  .production-image {
    display: block;
    width: 100%;
    padding-bottom: 10px;
  }

  .card-flex {
    display: flex;
    flex-wrap: wrap;
  }

  .camera-box {
    display: flex;
    flex-direction: column;
    .camera-img-box {
      position: relative;
      height: 100%;
    }
    .camera-name {
      position: absolute;
      left: 0;
      top: 0;
      padding: 8px;
      background: rgba(255, 255, 255, 0.3);
      color: #fff;
      font-size: 13px;
    }
    .camera-img {
      display: block;
      width: 100%;
      height: 100%;
      padding-bottom: 10px;
    }
    .camera-row {
      flex: 1;
    }
  }
}
.camera-col {
  height: 100%;
}

@media only screen and (max-width: 768px) {
  .camera-col {
    height: auto;
  }
}
</style>
